home *** CD-ROM | disk | FTP | other *** search
- *.cc *.h:: ++jrb bammi@cadence.com
- Massive number of hacks for atariST.
-
- ---------------------------- Patchlevel 1 -----------------------------------
-
- *.cc *.h:: david
-
- Hi. Enclosed are working libs and include files. The main mods have been
- to the file I/O stuff (except for a bug you introduced in str.cc, tsk tsk...)
- The following tests have been run:
-
- tBitSet, tBitString, tComplex, tFile, tFix, tFix16, tFix24, tGetOpt,
- tInteger, tObstack, tRandom, tRational, tString
-
- and all work fine and run easily except for a couple of (minor) caveats
-
- tRandom - one of the values (for SmplHist) is wrong, it's -3 times
- the value it ought to be
- tRational - needs a #define PI. Use the one in pml.h, since it's
- the most precise one I could find (and the only one
- that worked for every test)
- tObstack - crashed with bombs the first time I tried (at the end
- of the program, after all tests had been run successfully)
- Hasn't been a problem since.
- tComplex - needed hypot() defined. This is something that could
- perhaps be moved into the pml library.
-
- The only one that's actually *wrong* is tRandom - everything else is fine.
-
- The other tests are for container classes/generic stuff. I haven't looked
- at them yet.....
-
- As I said earlier, the main diffs are in the file I/O stuff. When you
- look through them, take the following order - File, streambuf, filebuf,
- Filebuf, then istream/ostream. File and streambuf are pretty well
- bin/text clean, but I haven't tested them to any great extent so there
- are likely to be problems. filebuf's are likely to be ok, Filebuf's
- less so. I don't remember making any mods to istream/ostream....
-
- I started to get a little lost in Filbuf's. (Multiple inheritance always
- gives me a headache...) The file opening stuff comes from File, while the
- buffering is from streambuf's. (BTW, I'm using the names of classes, not
- files.)
-
- All I can really promise about the stream stuff is that it works well
- enough to run the tests!
-
- Here are a few more notes about the operation of the libs....
-
- overflow/underflow are defined all over the place, and act as filbuf/flush
- for whatever class they're defined for. (These all filter down to
- each _filbuf/fflush or read/write.) must_overflow and must_underflow are
- called before every read/write, and call overflow/underflow if they
- have to. The File based classes use fputc/fgetc, and the bin/text stuff
- is handled by the GCC libs, though there's extra status in the state
- variable to indicate whether the File is in bin/text mode. The streambuf
- side, the putc is done by an inline, _atari_putc, while the various
- forms of getc all do their own thing. (There's get, get and advance, and
- advance.) There's a _bin_mode flag for streambufs. There may be a
- problem with the handling of _bin_mode for stdin/out/err: the streambuf
- stuff only deals with the file descriptor, not the FILE pointer, so I
- can't get at the _flags - all I do is check the fd against stdout->_file,
- etc.
-
- The end-pointer for the buffers is two less than the size of the buffers,
- in case of a '\n' write at the end of the buffer in text mode. (This hasn't
- been tested, so it won't work... ;-)
-
- The big change (ie, the one that actually got the streams working) was
- in Filebuf.cc, overflow(). _cnt is worked out before calling fflush
- (I think), and that was using the BSD semantics of _cnt, not yours.
- (Since I worked on the I/O stuff from the bottom up, this wasn't fixed
- until quite late on... :-(
-
- I don't do anything with _IONBF, _IOFBF, and _IOLBF. (You'll know what's
- best in these situations. This is known as 'passing the buck'... ;-)
- I also don't do anything about 16/32, though I reckon that's what all
- your size_t stuff is for, yes? (I haven't gotten round to investigating
- it.)
-
- I haven't included the exception handling stuff - not gotten round to
- testing them.
-
- It's now midnight on Sunday, I'm tired and going to bed. G'night.
-
-
- Addendum...
-
- Filenames now truncated to eight characters, and are all lowercase. Diffs
- are included, plus some extra files that didn't make it to patchlevel 1.
-
- ---------------------------- Patchlevel 2 -----------------------------------
-
- str.cc:: ++jrb
- char *str, "blanks" should really be a long, since the others
- are size_t, and a int would ovr/undr flow when -mshort.
-
- Makefile, makefile.16, makefile.32, mincl:: ++jrb
- new files. set up make as per our conventions in all other libs
-
- xcomplex.h:: ++jrb
- hypot() moved to pml lib where it belongs.
-
- xfile.cc:: ++jrb
- use the enum constants _atari_bin/text instead of hardcoding
- the numbers
-
- streambu.h:: ++jrb
- streambuf::stossc(): just need to advance the get pointer. No need to
- special case for _bin/_text mode, as the get fns (sgetc(), snextc())
- will advance the gptr over a \r when !_bin_mode. (the next time a
- get happens, after the advance).
-
- ident.c:: ++jrb
- new file, for ident(1) identification.
-
- ---------------------------- Patchlevel 3 -----------------------------------
-
- streambu.h:: david
- use <bool.h> instead of #defining TRUE/FALSE
-
- gnulib3.c:: ++jrb
- the atexit() call for destructors was inside a #ifdef section
- and was never compiled. moved it out. now the iostreams
- stuff works much better. i was wondering for a while there
- why destructors were not happening at the end.
-
- *.h *.cc:: ++jrb
- sync with gnu libg++-1.40. Note there are hardly any real changes
- mostly gpl lib licencing header comment changes. we might
- as well be in sync though.
-
- ---------------------------- Patchlevel 4 -----------------------------------
-
- *.h:: ++jrb
- get rid of #pragma once from gcc-2.0
-
- ---------------------------- Patchlevel 5 -----------------------------------
-
- all files:: ++jrb
- brand new port of libg++-2.0: note iosteams are the defaults now.
-
- ---------------------------- Patchlevel 6 -----------------------------------
-
- iostream.cc, strstrea.cc:: ++jrb
- fixes from the net.
-
- ---------------------------- Patchlevel 7 -----------------------------------
-
- streambu.h:: ++jrb
- clean up the binary flag stuff. define everything in terms of
- manifest constant _IOS_BIN. Also, in ios define binary and
- text flags so that in the spirit of fstreams one can say
- ofstream output_bin("filename", ios::out|ios::binary)
- instead of
- ofstream output_bin("filename", ios::out_bin);
- similarly
- ifstream input_text("filename", ios::in|ios::text);
- instead of
- ifstream input_text("filename", ios::in_text);
- etc..
-
- filebuf.cc:: ++jrb
- - in the open(name, int mode) was'nt setting bin
- flag for atarist
- - in the open(name, char *mode) allow "rb"/"wb" etc modes and set
- flags appropriately for bin/text mode.
-
- - also in both the cases above set initial flags appropriately from
- __default_mode__ (which is set by the C function _binmode(binp)).
-
- JUST in case it is'nt obvious: the atariST lib streams now fully
- honor the _binmode() and __DEFAULT_BUFSIZ__ semantic semantics of
- the atariST gcc C library, for all <iostreams> based streams and
- derivatives thereof. In case you are not familiar
-
- - calling _binmode(1): will cause all subsequent opens of any streams
- to be opened in binary mode (streams are opened in text mode normally).
- in any one individual call you can override the default. for example
-
-
- fopen("foo", "r"); open for read in text mode
- ifstream foo("foo", ios::read) open for read in text mode
-
- _binmode(1);
-
- fopen("foo", "r"); open for read in binary mode
- fopen("foo", "rt"); open for read in text mode
- ifstream foo("foo", ios::read) open for read in binary mode
- ifstream foo("foo", ios::read|ios::text) open for read in text mode
- ifstream foo("foo", ios::read|ios::binary) open for read in binary mode
- ifstream foo("foo", "r") open for read in binary mode
- ifstream foo("foo", "rt") open for read in text mode
-
- _binmode(0);
- ifstream foo("foo", "r") open for read in text mode
- ... and so on
-
-
- - __DEFAULT_BUFSIZ__ unless overridden by the user defines the default
- size of stream buffers, both in the C library and the G++ library.
- It is initialized to BUFSIZ (see stdio.h) if it is not defined in
- the user application.
-
- stream.cc xinteger.cc :: ++jrb
- updates from the net. Note: there has been very many patches on
- the net, and its all getting very confusing, as like most people
- i am also strugglinging to comprehend all the details of libg++.
- so the updates that i have applied are only the ones that i
- understood. maybe others can contribute to this effort.
-
- gnulib.c:: ++jrb
- rework it as per gcc-2.1 libgcc2.c. its much simpler now.
-
- xyzzy.cc:: ++jrb DELETE THIS FILE
- this hack not needed any more
-
- dummy.c:: ++jrb
- dummy global cons/dest list only pulled in when the program does'nt
- have any.
-
- IMPORTANT NOTE IMPORTANT NOTE IMPORTANT NOTE IMPORTANT NOTE IMPORTANT NOTE
- dummy.o MUST be the last object on this list. otherwise you'll
- end up with multiple definitions of global ctor/dtors and gcc-ld will
- barf. be especially aware of this if you directly manipulate g++.olb
- with gcc-ar. a good way to find out is to list the library with
- `gcc-ar tv g++.olb' and dummy.o should be the last file listed.
-
- ---------------------------- Patchlevel 8 -----------------------------------
-
- all files: ++jrb
- sync up with per (v 2.0.91). iterations, pl 9, 10....11. everything
- in sync with cygnus version now.
-
- ---------------------------- Patchlevel 11 -----------------------------------
-
- PatchLev.h iostream.h regex.h streambu.h
- filebuf.cc iostream.cc regex.cc sgetline.cc timer.cc xfix.cc xregex.cc:: ++jrb
-
- sync up with libg++-2.1. nothing major over 2.0.91, except for the
- addition of stossc() to streambufs for ATT compatibility.
-
- ---------------------------- Patchlevel 12 -----------------------------------
-
- all over:
- sync up with libg++ 2.1.9. lots of bug fixes, more accurate floating
- point i/o. this is not such a big deal for the atari.
-
- ---------------------------- Patchlevel 12.5 (not released) ------------------
-
- all over:
- sync up with libg++ 2.2. very minor bug fixes over libg++ 2.1.9
-
- ---------------------------- Patchlevel 13 -----------------------------------
-
- ident.c: frank
- #include "PatchLev.h" instead of <PatchLev.h> to include correct file.
-
- gnuaux.c:: ++jrb
- seperate out the new handler stuff from the __builtin_new_vec.
-
- mincl:: ++jrb
- new target for above.
-
- ---------------------------- Patchlevel 14 -----------------------------------
-
- dummy.c:: ++jrb
- break up file into two seperate files, dummy 1 and 2 seperating
- ctor from dtor for the case in which a program only has
- a one a global constructor or destructor.
-
- mincl:: ++jrb
- adjust atrgets for dummy[12].o
-
- gnuaux.c:: ++jrb
- dont pass a zero size request to malloc.
-
- ---------------------------- Patchlevel 15 -----------------------------------
-
- xobstack.cc:: ++jrb
- must use delete [] form, because was alloced with new [] form.
-
- filebuf.cc:: ++jrb
- fix from net
-
- iostream.cc:: ++jrb
- line 696 cast this as appro. gcc 2.3.2 barfs otherwise.
-
- *.cc, *.h:: ++jrb
- half way thru syncing up with changes in libg++ 2.3 distribution.
- i have done allthe non-io classes. still working on those.
-
- ---------------------------- Patchlevel 16 -----------------------------------
-
- *.cc:: ++jrb
- sync up with rest of libg++-2.3. all classes done now.
-
- ---------------------------- Patchlevel 17 -----------------------------------
-
- REMOVE gnulib3.c gnuaux.c dummy1.c dummy2.c
-
- mincl:: ++jrb
- adjust for above. the low level g++ support is now in theC library.
- this mirrors the organization of gcc. these files will be maintained
- there. only, the libg++ classes will be in -lg++.
-
- remove special build rule for xbitset.cc. gcc 2.3.3 pl3 fixes
- this problem (see patch to config/m68k.md)
-
- ---------------------------- Patchlevel 18 -----------------------------------
- filebuf.cc floatcon.cc outfloat.cc streambu.cc xinteger.cc
- xrationa.cc iomanip.h streambu.h :: ++jrb
- sync up with libg++ 2.3.1
-
- ---------------------------- Patchlevel 19 -----------------------------------
-
- RENAME iodtoa.cc to floatcon.cc due to gnu renaming. sorry about the
- last patch, that tried to patch the wrong file.
-
- *.cc, *.h:: ++jrb
- sync up with libg++ 2.3.10
-
- *.cc, *.h:: ++jrb
- sync up with libg++ 2.3.91
-
- *.cc, *.h:: ++jrb
- sync up with libg++ 2.4.0
-
- ---------------------------- Patchlevel 20 -----------------------------------
-
- stdio.h:: ++jrb
- Conditionalize _NFILE : if <compiler.h> is included,it defines
- it.
- ---------------------------- Patchlevel 20_1 ----------------------------------
-
- Sync up with libg++ 2.5.1, completely new io classes.
- Restructure source and test directory structures to make it easier for
- me to sync up with the GNU source tree. The current structure was
- becoming a major pain in the butt.:: ++jrb
-
- ---------------------------- Patchlevel 21 -----------------------------------
- in iosrc: builtinbuf.cc filedoalloc.c fileops.c floatconv.c genops.c
- iofclose.c iofdopen.c iofopen.c iofputs.c iofread.c iofwrite.c
- iopopen.c iostream.cc iovfscanf.c pfstream.cc sbscan.cc stdfiles.c
- stdstreams.cc streambuf.cc strops.c strstream.cc :: ++jrb
-
- sync with libg++ 2.5.2
-
- in iotests: tiomisc.cc tiomisc.exp: ++jrb
- new test from libg++ 2.5.2
-
- iotests/makefile.32, iotests/run32.g: ++jrb
- add above test
-
- in g++-inc : fstream.h iolibio.h libio.h libioP.h
- streambuf.h strstream.h: ++jrb
- sync with libg++ 2.5.2
-
- in iosrc: filedoalloc.c genops.c indstream.cc iofread.c iofsetpos.c
- iofwrite.c iovfprintf.c iovfscanf.c iovsscanf.c sbscan.cc : ++jrb
-
- sync with libg++ 2.5.3
-
- in g++-inc: iostreamP.h libioP.h streambuf.h
- sync with libg++ 2.5.3
-
- in libsrc: xfix.cc xinteger.cc: ++jrb
- sync with libg++ 2.5.3
-